import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/vue-composable',
        name: 'Demo1',
        component: () => import('../components/vueComposableExample.vue')
    },
    {
        path: '/customSlider',
        name: 'customSlider',
        component: () => import('../components/customRangeSlider.vue')
    },
    {
        path: '/introduce',
        name: 'IntroduceExample',
        component: () => import('../components/tutorials/introduceExample.vue')
    },
    {
        path: '/computed',
        name: 'ComputedExample',
        component: () => import('../components/tutorials/computedExample.vue')
    },
    {
        path: '/classAndStyle',
        name: 'ClassAndStyleExample',
        component: () => import('../components/tutorials/classAndStyleExample.vue')
    },
    {
        path: '/conditionalRendering',
        name: 'ConditionalRenderingExample',
        component: () => import('../components/tutorials/conditionalRenderingExample.vue')
    },
    {
        path: '/listRendering',
        name: 'ListRenderingExample',
        component: () => import('../components/tutorials/listRenderingExample.vue')
    },
    {
        path: '/eventHandling',
        name: 'EventHandlingExample',
        component: () => import('../components/tutorials/eventHandlingExample.vue')
    },
    {
        path: '/formInputBinding',
        name: 'FormInputBinding',
        component: () => import('../components/tutorials/formInputBinding.vue')
    },
    {
        path: '/componentBasics',
        name: 'ComponentBasics',
        component: () => import('../components/tutorials/componentsBasics.vue')
    },
    {
        path: '/axiosHttpClient',
        name: 'AxiosHttpClientTest',
        component: () => import('../components/tutorials/axiosHttpClientTest.vue')
    },
    {
        path: '/props',
        name: 'PropsComponent',
        component: () => import('../components/my-component/PropsComponent.vue')
    },
    {
        path:"/home/home",
        name:"HomeIndex",
        component:() => import("../components/home/Home.vue")
    },
    {
        path:"/vfor-example",
        name:"VForExamples",
        component:() => import("../components/tutorials/vforExamples.vue")
    }
]

const router = new VueRouter({
    routes
})

export default router
